package com.sh.设计模式.策略模式以及优化.map注册;

public class StrategyMapDemo {
    public static void main(String[] args) {
        System.out.println("member：" + StrategyRegistry.getStrategy("member").applyDiscount(100));
        System.out.println("vip：" + StrategyRegistry.getStrategy("vip").applyDiscount(100));
        System.out.println("unknown：" + StrategyRegistry.getStrategy("other").applyDiscount(100));
    }
}
